# ！ /usr/bin/python3
# -*- coding:utf-8 -*-
# @Author:Peng Cao
# @File: 操作Selenium.py
# @Software: PyCharm

from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver import ActionChains

url = "http://www.baidu.com"
driver = webdriver.Chrome()
driver.get(url=url)
driver.maximize_window()
# driver.find_element_by_link_text("新闻").click()
driver.find_element_by_partial_link_text("新闻").click()
exit()
el_sz = driver.find_element_by_id("s-usersetting-top")
ActionChains(driver).move_to_element(el_sz).perform()
el_ss = driver.find_element_by_xpath("//div[@id='s-user-setting-menu']//a[text()='高级搜索']")
el_ss.click()
# s1 = Select(el_sz)
# print(s1.select_by_index(0).text())

